package com.test;

import java.util.ArrayList;
import java.util.List;

import com.repair.dao.DeviceLeixing.impl.DeviceLeixingDao;
import com.repair.domain.DeviceLeixing;
import com.repair.service.DeviceLeixing.DeviceLeixingService;

public class DeviceLeixingtest {
	public static void savetest() {
		DeviceLeixingDao service = new DeviceLeixingDao();
		DeviceLeixing obj = new DeviceLeixing();
		obj.setDevicebianhao(123);
		obj.setDeviceleixing("abc");
		service.saveDeviceLeixing(obj);
	}

	public static void listtest() {
		DeviceLeixingService f = new DeviceLeixingService();
		List<DeviceLeixing> list = new ArrayList<DeviceLeixing>();
		list = f.list();
		/*
		 * int i; for(i=0;i<list.size();i++){
		 * System.out.println(list.get(i).getGuzhangleibie
		 * ()+" "+list.get(i).getGuzhangbianhao()); }
		 */
		for (DeviceLeixing item : list) {
			System.out.println(item.getDevicebianhao() + " " + item.getDeviceleixing());
		}
	}
	public static void deletetest(){
		DeviceLeixingService f=new DeviceLeixingService();
		DeviceLeixing obj = new DeviceLeixing();
		obj.setDevicebianhao(123);
		obj.setDeviceleixing("abc");

		f.delete(obj);
	}
	public static void main(String[] args) {
		// savetest();
		//listtest();
		deletetest();
	}
}
